﻿//-----------------------------------------------------------------------------------------
// <copyright file="Shortlink.cs" company="Jakub Florczyk (www.jakubflorczyk.pl)">
//      Copyright © 2009 Jakub Florczyk (www.jakubflorczyk.pl)
//      http://blipnet.codeplex.com/
// </copyright>
//-----------------------------------------------------------------------------------------

namespace BlipNet
{
    using System;
    using Newtonsoft.Json;

    /// <summary>
    /// Krótkie adresy.
    /// </summary>    
    public class Shortlink
    {   
        /// <summary>
        /// Identyfikator adresu.
        /// </summary>
        [JsonProperty("id")]
        public int Id { get; set; }

        /// <summary>
        /// Data utworzenia.
        /// </summary>
        [JsonProperty("created_at")]
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// Ilość kliknięć.
        /// </summary>
        [JsonProperty("hit_count")]
        public int HitCount { get; set; }

        /// <summary>
        /// Pełny adres.
        /// </summary>
        [JsonProperty("original_link")]
        [JsonConverter(typeof(UriConverter))]
        public Uri OriginalLink { get; set; }

        /// <summary>
        /// Skrót adresu.
        /// </summary>
        [JsonProperty("shortcode")]
        public string Shortcode { get; set; }
    }
}
